# 项目配置地址
from selenium.webdriver.common.by import By

url = "http://localhost:4723"
# 手机主页
shopping_center_app = By.XPATH, "//android.widget.TextView[@text='商城app' and @content-desc='商城app']"
# 我的
my = By.XPATH, "//android.widget.LinearLayout/android.widget.RelativeLayout[4]/android.widget.LinearLayout[1]/android.widget.ImageView[1]"
# 未登录
unlogged = By.XPATH, "//android.view.View[@text='未登录  ']"
# 用户名
user_name = By.XPATH, "//android.view.View[@text='请输入用户名']"
# 密码
paw = By.XPATH, "//android.view.View[@text='请输入密码']"
# 注册
sign_up = By.XPATH, "//android.view.View[@text='还没有账号？ 去注册>']"
# 登录
logged = By.XPATH, "//android.view.View[@text='登录  ']"
# 兰蔻粉水轻柔
goods = By.XPATH, "//android.view.View[@resource-id='app']/android.view.View[10]/android.view.View[1]/android.view.View[1]/android.widget.Image[1]"
# 测试商品B
goods_B = By.XPATH, "//android.view.View[@resource-id='app']/android.view.View[9]/android.view.View[1]/android.view.View[1]/android.widget.Image[1]"
# 餐厅装饰画现代简约
goods_restaurant = By.XPATH, "//android.view.View[@resource-id='app']/android.view.View[11]/android.view.View[1]/android.view.View[1]/android.widget.Image[1]"
# 菲律宾都乐非转基因木瓜
goods_papaya = By.XPATH, "//android.view.View[@resource-id='app']/android.view.View[12]/android.view.View[1]/android.view.View[1]/android.widget.Image[1]"
# apple 移动联通电信手机
goods_mobile_phone = By.XPATH, "//android.view.View[@resource-id='app']/android.view.View[13]/android.view.View[1]/android.view.View[1]/android.widget.Image[1]"
# 比利时梨子
goods_pear = By.XPATH, "//android.view.View[@resource-id='app']/android.view.View[14]/android.view.View[1]/android.view.View[1]/android.widget.Image[1]"
# 立即购买
Buy = By.XPATH, "//android.view.View[@text='立即购买']"
# 加入购物车
add_shopping_cart = By.XPATH, "//android.view.View[@text='加入购物车']"
# 加
add = By.XPATH, "//android.view.View/android.view.View[2]/android.view.View[2]/android.view.View[3]"
# 减
unadd = By.XPATH, "//android.view.View/android.view.View[1]/android.view.View[2]/android.view.View[2]/android.view.View[1]"
# 再次立即购买
add_BUy = By.XPATH, "//android.view.View/android.view.View[1]/android.view.View[3]/android.view.View[2]"
# 更换地址
address = By.XPATH, "//android.view.View[@resource-id='app']/android.view.View[1]/android.view.View[4]"
# 新增收货地址
new_address = By.XPATH, "//android.widget.TextView[@text='新增收货地址']"
# 姓名
name = By.XPATH, "//android.widget.TextView[@text='姓名']"
# 手机号码
mobile_number = By.XPATH, "//android.widget.TextView[@text='11位手机号码']/android.widget.TextView[1]"
# 所在地区
area = By.XPATH, "//android.widget.Image[@text='more']"
# 贵州省
GuiZhou = By.XPATH, "//android.view.View/android.view.View[1]/android.view.View[1]/android.view.View[1]/android.widget.TextView[2]"
# 贵阳市
GuiYang = By.XPATH, "//android.widget.TextView[@text='贵阳市']"
# 花溪区
HuaXi = By.XPATH, "//android.view.View/android.view.View[3]/android.view.View[1]/android.widget.TextView[2]"
# 确定
OK = By.XPATH, "//android.widget.TextView[@text='确定']"
# 详细地址
full_address = By.XPATH, "//android.widget.TextView[@text='如楼号/单元/门牌号']"
# 保存
Save = By.XPATH, "//android.widget.TextView[@text='保存收货地址']"
# 提交订单
type_order = By.XPATH, "//android.view.View[@text='提交订单']"
# 查看订单
look_order = By.XPATH, "//android.view.View[@text='查看订单 ']"
# 返回
return1 = By.XPATH, "//android.widget.FrameLayout/android.view.ViewGroup[1]/android.widget.FrameLayout[1]/android.widget.RelativeLayout[1]/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.TextView[1]"
# 返回提交订单的返回
return2 = By.XPATH, "//android.widget.FrameLayout/android.view.ViewGroup[1]/android.widget.FrameLayout[1]/android.widget.RelativeLayout[1]/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.TextView[1]"
# 在商品详情里面返回
return3 = By.XPATH, "//android.widget.TextView[@text='']"
# 购物车
shopping_cart = By.XPATH, "//android.widget.LinearLayout/android.widget.RelativeLayout[3]/android.widget.LinearLayout[1]"
# 全选
select_all = By.XPATH, "//android.view.View[@resource-id='app']/android.view.View[3]/android.view.View[1]/android.view.View[1]"
# 结算
check_out = By.XPATH, "//android.view.View[@text='结算']"
# 订单列表里面的返回
return4 = By.XPATH, "//android.widget.FrameLayout/android.view.ViewGroup[1]/android.widget.FrameLayout[1]/android.widget.RelativeLayout[1]/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.TextView[1]"
